﻿using System;
using System.Runtime.CompilerServices;

namespace System
{
    /*
    /// <summary>
    /// Memor扩展类
    /// </summary>
    public static class Span
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="span"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static bool Contains(this Span<char> span, char value)
        {
            for (int i = 0; i < span.Length; i++)
            {
                if (span[i] == value)
                {
                    return true;
                }
            }

            return false;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="span"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        public static bool Contains(this ReadOnlySpan<char> span, char value)
        {
            for (int i = 0; i < span.Length; i++)
            {
                if (span[i] == value)
                {
                    return true;
                }
            }

            return false;
        }

       
    }

     */
}
